package com.yiwyn.Creational.builder;

import lombok.Builder;
import lombok.Data;

import java.io.Serializable;

public class BuilderDemo {

    public static void main(String[] args) {
        User build = User.builder().age(20).build();
        System.out.println(build);
    }


    @Data
    @Builder
    static class User implements Serializable {
        private static final long serialVersionUID = -8151220194407102350L;
        private String name;
        private Integer age;
    }


}
